<?php
/*
 * @Author: 李诗韵 11366530+li-shiyun-shihan@user.noreply.gitee.com
 * @Date: 2022-08-17 22:12:11
 * @LastEditors: 李诗韵 11366530+li-shiyun-shihan@user.noreply.gitee.com
 * @LastEditTime: 2022-08-17 22:14:52
 * @FilePath: \前端开发c:\phpStudy\WWW\item\lin\server\orderQueryLikeName.php
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
    header("content-type:text/html;charset=utf-8");
    $conn = mysql_connect("localhost","root","root");
    $com =  mysql_select_db("library");
    $username = $_GET["username"];
    $sql = "select * from orderinfo inner join userinfo where orderinfo.did = userinfo.uid  and userinfo.username like '%$username%'";
    $res = mysql_query($sql);
    $arr = array();
    while($row = mysql_fetch_assoc($res)){
        array_push($arr,$row);
    }
    print_r(json_encode($arr));
?>